<template>
<div>
  <h1> 课程安排</h1>
<!--  放表格-->
  <el-table :data="curmForm"  border stripe>
    <el-table-column label="课程名称" prop="name" ></el-table-column>
    <el-table-column label="授课老师"prop="teacherName"></el-table-column>
    <el-table-column label="课时" prop="plan"></el-table-column>
    <el-table-column label="学分"prop="credit" ></el-table-column>
    <el-table-column label="上课时间"prop= "time"></el-table-column>
    <el-table-column label="上课地点" prop="position"></el-table-column>

  </el-table>
</div>
</template>



<script>
export default {
  data(){
     return {
       studentName:global.username,
       curmForm: []

     }
  },
  created() {
    this.getCurrms();
  },
  methods:{
    getCurrms(){
      this.$http.get('student/currms', {
        params: {
          id: this.studentName
        }
      }).then(
          res =>{
            console.log(res);
            this.curmForm = res.data.data;
          },res =>{
            console.log(res.state);
          })
    },
  }

}
</script>

<style lang ="less" scoped>

</style>